@model IEnumerable<Blogs.LazyFox.Models.BlogModel>

@{

    ViewData["Title"] = "Index";
}

<h1>Index</h1>

<p>
    <a asp-controller="Blog" asp-action="Create">新建博客</a>
</p>
<table class="table">
    <caption></caption>
    <thead>
        <tr>
            <th id="Title">
                @Html.DisplayNameFor(model => model.Title)
            </th>
            <th id="ReleaseDate">
                @Html.DisplayNameFor(model => model.Bid)
            </th>
            <th id="Genre">
                @Html.DisplayNameFor(model => model.CreateTime)
            </th>
            <th id="Price">
                @Html.DisplayNameFor(model => model.cover)
            </th>
            <th id="Id"></th>
        </tr>
    </thead>
    <tbody>
        @foreach (var item in Model!)
        {
            <tr>
                <td>
                    @Html.DisplayFor(modelItem => item.Title)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.Bid)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.CreateTime)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.cover)
                </td>
                <td>
                    <a asp-controller="Blog" asp-action="Edit" asp-route-Bid="@item.Bid">Edit</a> |
                    <a asp-controller="Blog" asp-action="Details" asp-route-Bid="@item.Bid">Details</a> |
                    <a asp-controller="Blog" asp-action="Delete" asp-route-Bid="@item.Bid">Delete</a>
                </td>
            </tr>

        }
    </tbody>
</table>
